 <?php 


$username = $_POST['username'];
$password = $_POST['password'];

include("opendb.php");
include("functions.php");


$res = isValidUser($username,$password);
if($res!=1) {
echo "0";
exit;
}


	
$query = "select u.*, s.ID, s.Parent_ID, s.Service from Users u left join Services s on s.ID = u.Service where u.Username='".$username."'";
$result = mysql_query($query) or die ("SQL Error".mysql_error());
$xml = getXML($result);
echo $xml;

?>
